
public class Exit {
	String pointer;
	char direction;
	
	boolean door,locked,hidden,keyRequired,doorState;
	String doorMaterial,keyID;
	int lockLevel,searchLevel;
	int doorSDC;
	
	boolean climbable;
	int climbSkill;
	
	/**
	 * Open exit - no door
	 * 
	 * @param roomPointer
	 * @param pointerDirection
	 */
	public Exit(String roomPointer, char pointerDirection){
		pointer = roomPointer;
		direction = pointerDirection;
		door = false;
	}
	
	public Exit(String roomPointer, char pointerDirection, String roomDoor){
		pointer = roomPointer;
		direction = pointerDirection;
		setDoor(roomDoor);
	}
	
	/**
	 * Exit with a door
	 * 
	 * @param roomPointer
	 * @param pointerDirection
	 * @param door
	 * @param lockpicking
	 * @param search
	 * @param key
	 * @param requireKey
	 */
	public Exit(String roomPointer, char pointerDirection, boolean state, int SDC, String doorType, boolean lock, int lockpicking, boolean hide, int search, String key, boolean keyNeeded, String keyVnum){
		pointer = roomPointer;
		direction = pointerDirection;
		door = true;
		doorState = state;
		doorMaterial = doorType;
		doorSDC = SDC;
		
		locked = lock;
		lockLevel = lockpicking;
		
		hidden = hide;
		searchLevel = search;
		
		keyRequired = keyNeeded;
		keyID = keyVnum;
	}
	
	public void toggleDoorLock(){
		locked ^= true;
	}
	
	public void toggleDoorState(){
		doorState ^= true;
	}
	
	public String toString(){
		if(door){
			return getDoorState() + " " + doorMaterial + " " + door;
		}
		else
			return "";
	}
	
	public String getDoorState(){
		if(doorState)
			return "open";
		else
			return "closed";
	}
	
	public String getLockState(){
		if(locked)
			return "locked";
		else
			return "";
	}
	
	public void setDoor(String roomDoor){
		door = true;
		doorState = true;
		doorMaterial = "Wood";
		doorSDC = 10;
		
		locked = false;
		lockLevel = 0;
		
		hidden = false;
		searchLevel = 0;
		
		keyRequired = false;
		keyID = "";
	}
}
